package ext.vpde.cadvaulting.migration;

import java.io.*;
import java.util.*;

public class SortByGeneric {
	
	public static void main ( String [] args ) throws Exception {
		BufferedReader file = new BufferedReader(new FileReader("family.txt"));
		PrintWriter pw = LoadUtil.openOutputFile("familySorted.txt");
		String s = file.readLine();
		while (s!= null && s.length() > 0) {	
			StringTokenizer strTok = new StringTokenizer(s,"|");
			String pName = strTok.nextToken();
			String pVer  = strTok.nextToken();
			String pIter = strTok.nextToken();
						   strTok.nextToken();
			String cName = strTok.nextToken();
			String cVer  = strTok.nextToken();
			String cIter = strTok.nextToken();
			pw.println(cName + "|" + cVer + "|" + cIter + "|" + pName + "|" + pVer + "|" + pIter);
			s = file.readLine();
		}
    }
}